package com.liu.gscfqa.pojo;

import java.time.LocalDateTime;

/**
 * 用户表实体类
 */
public class User {
    // 用户ID（主键）
    private Integer userId;

    // 用户名
    private String username;

    // 密码（加密存储）
    private String password;

    // 邮箱
    private String email;

    // 角色：student/teacher/admin
    private String role;

    // 头像（二进制数据）
    private byte[] avatar;

    // 注册时间
    private LocalDateTime registerTime;

    // 状态：0-禁用，1-正常
    private Integer status;

    // 空构造器
    public User() {
    }

    // 带基础参数的构造器
    public User(String username, String password, String email,String role, byte[] avatar) {
        this.username = username;
        this.password = password;
        this.email = email;
        this.role = role;
        this.avatar = avatar;
    }

    // Getter和Setter方法
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public byte[] getAvatar() {
        return avatar;
    }

    public void setAvatar(byte[] avatar) {
        this.avatar = avatar;
    }

    public LocalDateTime getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(LocalDateTime registerTime) {
        this.registerTime = registerTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
}